import { createRouter, createWebHistory, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    component: () => import('../views/index/index.vue')
  },
  {
    path: '/esplus',
    name: 'esplus',
    component: () => import('../views/esplus/index.vue')
  },
  {
    path: '/jiegou',
    name: 'jiegou',
    component: () => import('../views/jiegou/index.vue')
  },
  {
    path: '/template-string',
    name: 'template-string',
    component: () => import('../views/template-string/index.vue')
  },
  {
    path: '/obj',
    name: 'obj',
    component: () => import('../views/obj/index.vue')
  },
  {
    path: '/async',
    name: 'async',
    component: () => import('../views/async/index.vue')
  },
  {
    path: '/sanguo',
    name: 'sanguo',
    component: () => import('../views/sanguo/index.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
